package cn.istartfinancial.listener;


import cn.istartfinancial.entity.flowable.UserLeave;
import org.flowable.task.service.delegate.DelegateTask;
import java.util.Map;

/**
 * @author: Nzp
 * @date: 2018/8/30 15:20
 * @description: 自定义请假流程 监听器
 */
public class LeaveListenerImpl extends ActNodeListener
{
    @Override
    public void notify(DelegateTask delegateTask)
    {
        super.notify(delegateTask);
        String taskId = delegateTask.getId();
        Map<String, Object> map = delegateTask.getVariables();
        UserLeave userLeave = (UserLeave) map.get("userLeave");
        delegateTask.addCandidateUser(userLeave.getUserId());
    }
}
